package create.factory.factory_demo3;

/**
 * @author yeyangtao created at 2021/11/16 11:03
 */
interface A {
    void a();
}

class A1 implements A {

    @Override
    public void a() {
        System.out.println("a11111");
    }
}

class A2 implements A {

    @Override
    public void a() {
        System.out.println("a22222");
    }
}

public class FactoryDemo3 {
    public static void main(String[] args) {
        A a1 = new A1();
        a1.a();

        A a2 = new A2();
        a2.a();
    }
}
